//
//  SupplyOfGoodsTVCell.m
//  Logistics
//
//  Created by enzhoukeji on 2018/8/12.
//  Copyright © 2018年 puyue.com. All rights reserved.
//

#import "SupplyOfGoodsTVCell.h"

@implementation SupplyOfGoodsTVCell
-(void)loadViews {
    self.titleImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"fahuo"]];
    self.titleLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:14] withColor:[UIColor blackColor] withText:@"基督教阿"];
    self.contentLabel =[UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor grayColor] withText:@"点击选择"];
    [self addSubview:self.titleImage];
    [self addSubview:self.titleLabel];
    [self addSubview:self.contentLabel];
}
-(void)layoutViews {
    [self.titleImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(20));
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(GTFixHeightFlaot(20));
    }];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.titleImage.mas_right).offset(GTFixWidthFlaot(5));
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(self.titleLabel.mas_width);
    }];
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.titleLabel.mas_right).offset(GTFixWidthFlaot(15));
        make.centerY.mas_equalTo(self.titleLabel.centerY);
        make.height.mas_equalTo(GTFixHeightFlaot(25));
        make.width.mas_equalTo(kMainScreen_width - GTFixWidthFlaot(100));
    }];
}
@end

@implementation SupplyOfGoodsTVCellSecond
-(void)loadViews {
    self.titleImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"fahuo"]];
    self.titleImage.contentMode = UIViewContentModeScaleAspectFit;
    self.titleLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:14] withColor:[UIColor blackColor] withText:@"货物重量/体积"];
    self.textTonsOf = [UITextField new];
    self.textTonsOf.tintColor = [AppStyleConfiguration ColorWithTextOne];
    self.textTonsOf.textColor = [AppStyleConfiguration ColorWithTextOne];
    self.textTonsOf.font = [AppStyleConfiguration appFont:13];
    self.textTonsOf.placeholder = @"点击输入";
    self.tonsOfLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:14] withColor:[UIColor blackColor] withText:@"吨"];
    self.textparty = [UITextField new];
    self.textparty.tintColor = [AppStyleConfiguration ColorWithTextOne];
    self.textparty.textColor = [AppStyleConfiguration ColorWithTextOne];
    self.textparty.font = [AppStyleConfiguration appFont:13];
    self.textparty.placeholder = @"点击输入";
     self.partyLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:14] withColor:[UIColor blackColor] withText:@"方"];
    [self addSubview:self.titleImage];
    [self addSubview:self.titleLabel];
    [self addSubview:self.textTonsOf];
    [self addSubview:self.tonsOfLabel];
    [self addSubview:self.textparty];
    [self addSubview:self.partyLabel];

}
-(void)layoutViews {
    [self.titleImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(20));
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.height.mas_equalTo(GTFixHeightFlaot(20));
        make.width.mas_equalTo(GTFixHeightFlaot(20));
    }];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.titleImage.mas_right).offset(GTFixWidthFlaot(5));
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.height.mas_equalTo(GTFixHeightFlaot(20));
        make.width.mas_equalTo(self.titleLabel.mas_width);
    }];
    [self.textTonsOf mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(25));
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(GTFixHeightFlaot(5));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(GTFixWidthFlaot(80));
    }];
    [self.tonsOfLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.textTonsOf.mas_right).offset(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(GTFixHeightFlaot(5));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(self.tonsOfLabel.mas_width);
    }];
    [self.textparty mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.tonsOfLabel.mas_right).offset(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(GTFixHeightFlaot(5));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(GTFixWidthFlaot(80));
    }];
    [self.partyLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.textparty.mas_right).offset(GTFixWidthFlaot(10));
        make.top.mas_equalTo(self.titleLabel.mas_bottom).offset(GTFixHeightFlaot(5));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(self.partyLabel.mas_width);
    }];
}
@end

@implementation SupplyOfGoodsTVCellThree
-(void)loadViews {
    self.titleImage = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"fahuo"]];
    self.titleLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:14] withColor:[UIColor blackColor] withText:@"基督教阿"];
    self.contentLabel =[UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor grayColor] withText:@"点击选择"];
    self.yuanLabel  =[UILabel labelWithSize:[UIFont systemFontOfSize:14] withColor:[UIColor grayColor] withText:@"元"];
    [self addSubview:self.titleImage];
    [self addSubview:self.titleLabel];
    [self addSubview:self.contentLabel];
    [self addSubview:self.yuanLabel];
}
-(void)layoutViews {
    [self.titleImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(GTFixWidthFlaot(20));
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(GTFixHeightFlaot(20));
    }];
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.titleImage.mas_right).offset(GTFixWidthFlaot(5));
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.width.mas_equalTo(GTFixWidthFlaot(55));
    }];
    [self.contentLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.mas_equalTo(self.titleLabel.mas_right).offset(GTFixWidthFlaot(5));
        make.centerY.mas_equalTo(self.titleLabel.centerY);
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.yuanLabel.mas_width);
    }];
    [self.yuanLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.mas_equalTo(GTFixWidthFlaot(-20));
        make.centerY.mas_equalTo(self.contentLabel.centerY);
        make.height.mas_equalTo(GTFixHeightFlaot(15));
        make.width.mas_equalTo(self.yuanLabel.mas_width);
    }];
}
@end

@implementation SupplyOfGoodsTVCellFour
-(void)loadViews {
    self.titleLabel = [UILabel labelWithSize:[UIFont systemFontOfSize:12] withColor:[UIColor grayColor] withText:@"发货后货源最多保留24小时"];
    self.saveButton = [UIButton buttonWithTitle:@"存为常发货" withImageName:nil withBGColor:nil Withlayer:NO];
    self.saveButton.layer.cornerRadius = 5;
    self.saveButton.layer.borderColor = [UIColor grayColor].CGColor;
    self.saveButton.layer.borderWidth = 1.0;
    self.saveButton.titleLabel.font = [UIFont systemFontOfSize:14];
    [self.saveButton setTitleColor:[UIColor grayColor] forState:UIControlStateNormal];
    [self addSubview:self.titleLabel];
    [self addSubview:self.saveButton];

}
-(void)layoutViews {
    [self.titleLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(0);
        make.bottom.mas_equalTo(0);
        make.left.mas_equalTo(GTFixWidthFlaot(20));
        make.width.mas_equalTo(self.titleLabel.mas_width);
    }];
    [self.saveButton mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(GTFixHeightFlaot(10));
        make.bottom.mas_equalTo(GTFixHeightFlaot(-10));
        make.right.mas_equalTo(GTFixWidthFlaot(-30));
        make.width.mas_equalTo(GTFixWidthFlaot(70));
    }];
}
@end





